import { gpMoveInfoPosValue,getLongitudeLatitude} from '@/common/type'
export default {
  data(){
    return {
      distances:0,//
    }
  },
  methods: {
    //定位操作
    longitudeLatitude () {
      const param = {
        lat: uni.getStorageSync ('lat') ,
        lng: uni.getStorageSync ('lng') ,
        moveId: this.id ,
      }
      let distance = {
        distance: ''
      }
      gpMoveInfoPosValue (param).then (res => {
        distance.distance = res.distance
        this.distances = getLongitudeLatitude ([distance])[0]
      })
    } ,
  },
  onShow() {
    this.longitudeLatitude()
  },
}
